<?php
// <copyright file="AuthenticationType.cs" company="NQtec">
// Copyright (c) 2008, 2009 All Right Reserved, http://www.dqer.com/
// Copyright (c) 2008, 2009 All Right Reserved, http://www.nqtec.com/
//
// This source is part of the DQER library that released under the LGPL.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Victor Gatkov</author>
// <email>v.gatkov@nqtec.com</email>
// <email>info@dqer.com</email>
// <date>2008-09-11</date>
// <summary>Contains a base, abstract class for an AuthorisationPolicyProvider</summary>

class RenderMenu {

function render_top_menu() {
 global $menu_header_pages, $la, $local;

 if(MENU_TS){$ts="/";}else{$ts="";}
 if(LINKABS){$h_pr=URL.$ts;}else{$h_pr=ROOT_PATH;}
   echo "    <ul>\r";

 if(MENU_LOCAL) {
    $lann = count($la);
    if($lann>1) {
      for($i=0;$i<$lann;$i++) {
         if(META_LANG==$la[$i]) {
             if(!LOCAL_MENU_IMG){echo"        <li>".$la[$i]."</li>\r";}else{echo"        <li><img src='".LOCAL_FLAG_PATH."".$la[$i]."_off.gif' alt='".$la[$i]."' title='".$la[$i]."' /></li>\r";}
         } else {
             if(!LOCAL_MENU_IMG){echo"        <li><a href=\"?lg=".$la[$i]."\">".$la[$i]."</a></li>\r";}else{echo"        <li><a href=\"?lg=".$la[$i]."\"><img src='".LOCAL_FLAG_PATH."".$la[$i].".gif' alt='".$la[$i]."' title='".$la[$i]."' /></a></li>\r";}
 // rel=\"nofollow\"
         }
      }
      echo "         <li>&nbsp;|&nbsp;</li>\r";
    }
 }

//      echo "         <li>&nbsp;|&nbsp;</li>\r";


 if(MENU_HEADER_HOME) {
      if(PGID=='home') {
            echo"        <li>".$local->translate(PGID)."</li>\r";
      } else {
            echo"        <li><a href=\"".$h_pr."\">".$local->translate('home')."</a></li>\r";
      }
 }
 if(MENU_HEADER_PAGES) {
      for($i=0;$i<count($menu_header_pages);$i++) {
         if(PGID==$menu_header_pages[$i]) {
             echo"        <li>".$local->translate(PGID)."</li>\r";
         } else {
             echo"        <li><a href=\"".$h_pr.$menu_header_pages[$i].$ts."\">".$local->translate($menu_header_pages[$i])."</a></li>\r"; // rel=\"nofollow\"
         }
      }
 }
 if(MENU_MEMBER) {
      if(PGTP=='sign') {
            echo"        <li>".$local->translate('members')."</li>\r";
      } else {
            echo"        <li><a href=\"".$h_pr."sign".$ts."\">".$local->translate('members')."</a></li>\r";
      }
 }


   echo "    </ul>\r";
}

function render_footer_menu() {
 global $menu_footer_pages, $local;

 if(MENU_TS){$ts="/";}else{$ts="";}
 if(LINKABS){$h_pr=URL.$ts;}else{$h_pr=ROOT_PATH;}
 $ff=0;
 echo "    <ul class=\"cnt\">\r";
 if(MENU_FOOTER_HOME) {
          $iff=" class=\"first\"";
          $ff=1;
          echo "       <li".$iff."><a href=\"".$h_pr."\">".$local->translate('home')."</a></li>\r";
 }
 if(MENU_FOOTER_PAGES) {
   for($i=0;$i<count($menu_footer_pages);$i++) {
      if($i==0&&$ff==0){$iff=" class=\"first\"";}else{$iff="";}
          echo "       <li".$iff."><a href=\"".$h_pr.$menu_footer_pages[$i].$ts."\">".$local->translate($menu_footer_pages[$i])."</a></li>\r";
   }
 }
 echo "    </ul>\r";
}

};

?>
